// components/zt-position-item/zt-position-item.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: {
      type: String,
      value: ''
    },
    distance: {
      type: String,
      value: ''
    },
    address: {
      type: String,
      value: ''
    },
    selected: {
      type: Boolean,
      value: 0,
      observer(newVal, oldVal, changedPath) {
        let tmp = "../../images/zt_position_unselect.png";
        if (newVal) {
          tmp = '../../images/zt_position_select.png';
        }
        this.setData({
          icon: tmp
        });
      }
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    icon: '../../images/zt_position_unselect.png'
  },

  /**
   * 组件的方法列表
   */
  methods: {

  }
})